﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="renderer" content="webkit">
    <title>个人资料</title>
    <link href="/CSS/bootstrap3.3.5/css/bootstrap.css" rel="stylesheet" type="text/css" />
    <link href="/CSS/font-awesome-4.3.0/css/font-awesome.css?v=4.3.0" rel="stylesheet">
    <link href="/CSS/V3/animate.css" rel="stylesheet">
    <link href="/CSS/V3/style.css?v=2.2.0" rel="stylesheet">
    <script src="/Scripts/jquery-1.11.2.min.js"></script>
    <script src="/CSS/bootstrap3.3.5/js/bootstrap.js"></script>
    <script src="/JqueryPlug/laypage/laypage.js"></script>
    <script src="/Scripts/avalon.js"></script>
    <script src="/Scripts/SZHLCommon.js?jsver=5"></script>

    <style type="text/css">
        .ibox-title{border:none;}
    </style>
    <script type="text/javascript">
        var model = avalon.define({
            $id: "GRZL",
            modelData: {},
            UserName: ComFunJS.getQueryString("UserName", 0),
            BranchName:"",
            dtList: [],
            initForm: function () {
                if (model.UserName) {
                    $.getJSON("/API/SZHLAPI.ashx?Action=GETUSERBYUSERNAME&r=" + Math.random(), { P1: model.UserName }, function (data) {
                        if (data.ErrorMsg == "") {
                            model.modelData = data.Result;
                            model.BranchName = data.Result1;
                        }
                    })

                    $.getJSON('/API/FTAPI.ashx?Action=GETXTDTLIST', { P1: model.UserName }, function (resultData) {
                        if (resultData.ErrorMsg == "") {
                            model.dtList = resultData.Result;
                            if (parseInt(resultData.Result1) > 0) {
                                $("#pageDiv").show();
                                laypage({
                                    cont: 'pageDiv', //容器。值支持id名、原生dom对象，jquery对象。
                                    pages: Math.ceil(parseInt(resultData.Result1) * 1.0 / 8), //通过后台拿到的总页数
                                    curr: 1, //初始化当前页
                                    jump: function (e) { //触发分页后的回调
                                        $.getJSON('/API/FTAPI.ashx?Action=GETXTDTLIST', { P1: model.UserName, p: e.curr}, function (resultData) {
                                            model.dtList.clear();
                                            model.dtList = resultData.Result;
                                        })
                                    }
                                });
                            }
                            else {
                                $("#pageDiv").hide();
                            }
                        }
                    })
                }
            }
        });
        avalon.ready(function () {
            //ComFunJS.initsetajax();
            model.initForm();
        });

    </script>
</head>
<body class="gray-bg" ms-controller="GRZL">
    <div class="wrapper wrapper-content">
        <div class="row animated fadeInRight">
            <div class="col-sm-4">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>个人资料</h5>
                    </div>
                    <div>
                        <div class="ibox-content no-padding border-left-right">
                            <!--<img alt="image" class="img-responsive" src="/images/tx/default.png" style="width:65px;height:65px;">-->
                        </div>
                        <div class="ibox-content profile-content">
                            <p style="display:inline">
                                <img alt="image" ms-attr-src="'/Upload/TX/'+modelData.CRUser+'.jpg'" onerror="javascript: this.src = '/images/TX/default.png'">
                                <span style=" padding-top:20px; padding-right:10px;font-weight:bold;font-size:15px;margin-left:50px">{{modelData.UserRealName}}</span>
                            </p>
                            <p style="margin-top:10px;">部门：{{BranchName}}</p>
                            <p>
                                手机号：{{modelData.mobphone}}
                            </p>
                            <p>
                                邮箱：{{modelData.mailbox}}
                            </p>
                            <p>
                                职务：{{modelData.zhiwu}}
                            </p>
                            <!--<p style="margin-bottom:10px;">
                                职责：{{modelData.UserRealName}}
                            </p>-->
                            <div class="user-button">
                                <div class="row">
                                    <!--<button type="button" class="btn btn-primary btn-sm btn-block"><i class="fa fa-coffee"></i> 关注</button>
                                    <button type="button" class="btn btn-default btn-sm btn-block"><i class="fa fa-coffee"></i> 取消关注</button>-->
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-sm-8">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>最新动态</h5>
                        <div class="btn-group pull-right">
                            <div id="pageDiv" class="text-center"></div>
                        </div>
                    </div>
                    <div class="ibox-content">
                        <div>
                            <div class="feed-activity-list">
                                <div class="feed-element" ms-repeat-el="dtList">
                                    <div class="media-body ">
                                        <small class="pull-right text-navy">{{el.CRDate|date("MM月dd日 HH:mm")}}</small>
                                        {{el.DTContent}}
                                    </div>
                                </div>
                            </div>
                            <!--<button class="btn btn-primary btn-block m"><i class="fa fa-arrow-down"></i> 显示更多</button>-->
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</body>
</html>
